<!--二维码查看 -->
<template >
    <img :style="style"
         :id="id"
         :name="name"
         :bindProp="bindProp"
         :class="cls"
         v-model="value"
         :src="url"  />
</template>

<script>
    exports = {
        templateType:'vue',
        data: function () {
            return {
                id:'',
                name:'',
                data:{},
                otherAttrs:{},
                bindProp:'',
                value: '',
                style:'',
                cls:'',
                url:'',
                placeholder:''
            }
        },
        mounted:function(){
            //初始化 根据 value内容 初始化 url
            this.value = this.value||this.otherAttrs.value||"";
            if(this.value){
                this.url = ''; //TODO 根据value内容转换为 url地址
            }else{
                this.url = oui.getContextPath()+'res_engine/page_design/pc/images/qrcode-default.svg';
            }
        },
        methods:{
//            _controlOnUpdate:function(v,ov){
//                var key = this.bindProp;
//                this.onUpdate&&this.onUpdate(key,v,ov); //外部构造的方法调用
//            }
        }
    }
</script>

<style>

</style>